#include <stdio.h>

int main(){
    int numCnt; scanf("%d", &numCnt);
    int arr[numCnt];
    int item, pos;
    for (int i = 0; i < numCnt; i++) { scanf("%d", &arr[i]); }
    for (int j = 0; j < numCnt;) {
        int item = arr[j];
        pos = j;
        for (int k = j + 1; k < numCnt; k++) {
            if (arr[k] < item) { pos++; }
        }
        if (pos != j) {
            // 交换
            while (arr[pos] == arr[j]) { pos++; }
            int swap = arr[pos];
            arr[pos] = arr[j];
            arr[j] = swap;
        }
        else { j++; }
        // 寻找下一个未排序单位
    }
    for (int l = 0; l < numCnt; ++l) {
        printf("%d ", arr[l]);
    }
}